using System;
using System.Collections.Generic;
using System.Linq;
using Granite.Xaml.Converters;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Granite.Xaml.Tests.Converters
{
	[TestClass]
	public class NullToTrueConverterTests : ConverterTest<NullToTrueConverter>
	{

		[TestMethod]
		public void NullToTrueConverter_Test()
		{
			Convert<bool>(true, null);
			Convert<bool>(false, 0);
			Convert<bool>(false, "");

			Convert<bool?>(true, null);
			Convert<bool?>(false, 0);
			Convert<bool?>(false, "");

			BadTargetType<int>();
			BadTargetType<string>();

			NoConvertBack();
		}
	}
}
